import fetchApi from "@/utils/request"
export default {
    //活动列表
    activityList(params) {
        return fetchApi("/api/v1/admin/activities", "GET", params)
    },
    //创建活动
    addActivity(params) {
        return fetchApi("/api/v1/admin/activities", "POST", params)
    },
    //修改活动
    editActivity(id, params) {
        return fetchApi(`/api/v1/admin/activities/${id}`, "PUT", params)
    },
    //删除活动
    deleteActivity(id) {
        return fetchApi(`/api/v1/admin/activities/${id}`, "DELETE", {})
    },
    //活动详情
    getActivityDetail(id) {
        return fetchApi(`/api/v1/admin/activities/${id}`, "GET", {})
    },
    //活动类型
    getActivityTypes() {
        return fetchApi("/api/v1/admin/activity-types", "GET", {})
    },
    //修改活动状态
    setActivityStatus(id, params) {
        return fetchApi(`/api/v1/admin/activities/${id}/status`, "PUT", params)
    },
    //礼物列表
    giftList(params) {
        return fetchApi("/api/v1/pc/gifts", "GET", params)
    },
    //提现记录
    withdrawRecordList(params) {
        return fetchApi("/api/v1/admin/withdraw", "GET", params)
    },
    //提现
    withdraw(params) {
        return fetchApi("/api/v1/admin/withdraw", "POST", params)
    },
    //活动消息列表
    actMsgList(id) {
        return fetchApi(`/api/v1/admin/activities/${id}/messages`, "GET", {})
    }
}
